import request from '@/utils/request'

// 查询入库检列表
export function warehouseInList(query) {
    return request({
        url: '/quality/inspection/getWarehouseInList',
        method: 'get',
        params: query
    })
}

// 查询出库检列表
export function warehouseOutList(query) {
    return request({
        url: '/quality/inspection/getWarehouseOutList',
        method: 'get',
        params: query
    })
}

//加载销售出货单数据
export function salesList(query) {
    return request({
        url: '/quality/inspection/salesList',
        method: 'get',
        params: query
    })
}

//加载生产入库单数据
export function salesWorkList(query) {
    return request({
        url: '/quality/inspection/salesWorkList',
        method: 'get',
        params: query
    })
}

export function salesPurchaseList(query) {
    return request({
        url: '/quality/inspection/salesPurchaseList',
        method: 'get',
        params: query
    })
}

// 新增质检
export function addQuality(data) {
    console.log(data)
    return request({
        url: '/quality/inspection/addQuality',
        method: 'post',
        data: data
    })
}

// 修改销售出货检状态
export function updateStatus(data) {
    return request({
        url: '/stock/out/updateStatus',
        method: 'put',
        data: data
    })
}

// 修改状态
export function updateInStatus(data) {
    return request({
        url: '/stock/in/updateStatus',
        method: 'put',
        data: data
    })
}